all: tfe

WARNINGS = -Wall
PKGS = gtk4
DEBUG = -g -DDEBUG -m64

SOURCES = main.c pfd2css.c tfeApplication.c tfewindow.c tfenotebook.c tfepref.c tfealert.c tfetextview.c

HEADERS = pfd2css.h tfeApplication.h tfewindow.h tfenotebook.h tfepref.h tfealert.h tfetextview.h

resources.c: tfe.gresource.xml $(shell glib-compile-resources --generate-dependencies tfe.gresource.xml)
	glib-compile-resources tfe.gresource.xml --generate-header --target=resources.h --c-name tfe ; \
	glib-compile-resources tfe.gresource.xml --generate-source --target=resources.c --c-name tfe ;

tfe: $(SOURCES) $(HEADERS) tfe.gresource.xml resources.c
	$(CC) -o tfe $(WARNINGS) $(DEBUG) $(SOURCES) resources.c $(shell pkg-config --cflags --libs $(PKGS))

clean:
	rm -f tfe resources.c resources.h
